package com.zd.kids.net;

import com.zd.kids.DataBean.BaseDataBean;
import com.zd.kids.DataBean.BookSeriesDataBean;
import com.zd.kids.DataBean.BookSeriesListDataBean;
import com.zd.kids.DataBean.BookUnitDataBean;
import com.zd.kids.DataBean.CalendarTimeDataBean;
import com.zd.kids.DataBean.CheackAppVersionDataBean;
import com.zd.kids.DataBean.ChecBookCodeDataBean;
import com.zd.kids.DataBean.CommonStatusDataBean;
import com.zd.kids.DataBean.CountryDataBean;
import com.zd.kids.DataBean.MainGroupDataBean;
import com.zd.kids.DataBean.PicBookDataBean;
import com.zd.kids.DataBean.RecodVideoDataBean;
import com.zd.kids.DataBean.TestTrainDataBean;
import com.zd.kids.DataBean.TestTrainWordResultDataBean;
import com.zd.kids.DataBean.TestWordDataBean;
import com.zd.kids.DataBean.TrainTypeDataBean;
import com.zd.kids.DataBean.TrainWordDataBean;
import com.zd.kids.DataBean.UseGuideDataBean;
import com.zd.kids.DataBean.UserInfo;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface ApiService {
    @GET("inspire/get_country")
    Observable<BaseDataBean<List<CountryDataBean>>> getCountrys();

    @POST("inspire/reg_checkactivecode")
    @FormUrlEncoded
    Observable<BaseDataBean<ChecBookCodeDataBean>> registcheckBookCode(@Field("activecode") String key);

    @POST("inspire/addactivecode")
    @FormUrlEncoded
    Observable<BaseDataBean<ChecBookCodeDataBean>> checkBookCode(@Field("code") String key);

    @POST("inspire/check_sms")
    @FormUrlEncoded
    Observable<BaseDataBean<CommonStatusDataBean>> register(@FieldMap Map<String, String> paramMap);

    @POST("inspire/send_sms")
    @FormUrlEncoded
    Observable<BaseDataBean<String>> registSendSms(@Field("mobile") String mobile, @Field("countryid") String countryid);

    @GET("inspire/get_video/{unitid}")
    Observable<BaseDataBean<RecodVideoDataBean>> getRecodVideo(@Path("unitid") String mobile);

    @POST("inspire/get_yl_score")
    @FormUrlEncoded
    Observable<BaseDataBean<TestTrainWordResultDataBean>> uploadVideoRecord(@FieldMap() Map<String, String> paramMaps);


    @POST("inspire/check_sms")
    @FormUrlEncoded
    Observable<BaseDataBean> checkSms(@Field("mobile") String mobile);


    @POST("inspire/login_send_sms")
    @FormUrlEncoded
    Observable<BaseDataBean<String>> getloginMobileSms(@Field("mobile") String mobile, @Field("countryid") String countryid);

    @POST("inspire/user_login")
    @FormUrlEncoded
    Observable<BaseDataBean<CommonStatusDataBean>> userLogin(@Field("mobile") String mobile, @Field("countryid") String countryid, @Field("code") String code);


    @GET("inspire/get_groups")
    Observable<BaseDataBean<List<MainGroupDataBean>>> getMainGroupDatas(@QueryMap Map<String, String> paramMap);


    @GET("inspire/get_category/{groupid}")
    Observable<BaseDataBean<BookSeriesDataBean>> getBookCategorys(@Path("groupid") String groupid, @QueryMap Map<String, String> paramMap);

    @GET("inspire/get_units/{groupid}/{categoryid}")
    Observable<BaseDataBean<BookUnitDataBean>> getBookUnits(@Path("groupid") String groupid, @Path("categoryid") String categoryid);

    @GET("inspire/get_assess/{groupid}/{categoryid}")
    Observable<BaseDataBean<List<TestTrainDataBean>>> getAiTestTrainDatas(@Path("groupid") String groupid, @Path("categoryid") String categoryid);

    @GET("inspire/get_newword/{unitid}")
    Observable<BaseDataBean<TrainWordDataBean>> getNewwords(@Path("unitid") String unitid);

    @GET("word")
    Observable<BaseDataBean<TrainWordDataBean>> getScanWords(@Query("newwordid") String newwordid);

    @GET("tutorial_video/{unitid}")
    Observable<BaseDataBean<UseGuideDataBean>> getVideoGuide(@Path("unitid") String unitid);

    @GET("get_test/{unitid}")
    Observable<BaseDataBean<TestWordDataBean>> getTestWords(@Path("unitid") String unitid);

    @GET("list")
    Observable<BaseDataBean<TrainTypeDataBean>> getTrainList(@Query("unitid") String unitid);


    @GET("inspire/get_profile")
    Observable<BaseDataBean<UserInfo>> getUserInfo();


    @POST("inspire/add_test_record")
    @FormUrlEncoded
    Observable<BaseDataBean<TestTrainWordResultDataBean>> uploadTestRecord(@FieldMap Map<String, String> map);


    @POST("inspire/send_mail")
    @FormUrlEncoded
    Observable<BaseDataBean<String>> sendMail(@FieldMap Map<String, String> map);

    @POST("inspire/add_assess_record")
    @FormUrlEncoded
    Observable<BaseDataBean> uploadAiRecord(@FieldMap Map<String, String> map);

    @POST("version")
    @FormUrlEncoded
    Observable<BaseDataBean<CheackAppVersionDataBean>> checkApkVersion(@Field("device") String device);


    @GET("inspire/complete_video/{unitid}")
    Observable<BaseDataBean> setVideoCompleteResult(@Path("unitid") String unitid);


    @GET("inspire/complete_picbook/{unitid}")
    Observable<BaseDataBean> setPicBookCompleteResult(@Path("unitid") String unitid);

    @GET("inspire/complete_newword/{unitid}")
    Observable<BaseDataBean> setTrainCompleteResult(@Path("unitid") String unitid);

    @GET("inspire/complete_test/{unitid}")
    Observable<BaseDataBean> setTestCompleteResult(@Path("unitid") String unitid);

    @GET("inspire/get_picbook/{unitid}")
    Observable<BaseDataBean<PicBookDataBean>> getPicBook(@Path("unitid") String unitid);


    @GET("inspire/complete_assess/{GroupID}/{CategoryID}")
    Observable<BaseDataBean> setAiCompleteResult(@Path("GroupID") String groupId, @Path("CategoryID") String categoryID);


    @GET("getbooking")
    Observable<BaseDataBean<List<CalendarTimeDataBean>>> getCalendarData();


    @GET("getbooking")
    Observable<BaseDataBean<List<CalendarTimeDataBean>>> getLanguageData();


    @GET()
    @Streaming
    Observable<ResponseBody> downFile(@Url String url);

    @Streaming
    @GET()
    Observable<ResponseBody> downloadApk(@Header("Accept-Encoding") String encoding, @Url String urlPath);

}
